From: Georges Basile Stavracas Neto Date: Mon, 11 Nov 2019 21:07:19 +0000 (-0300) Subject: folderView: Center folder icon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~419 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=913990b9eac95565479d98bc03d46ca4b55be93e;p=gnome-shell.git folderView: Center folder icon The FolderView class is responsible for creating the 4-item grid of the folder icon, with the preview of the first four apps inside the folder. However, with the deprecation of StAlign as child properties, the folder icon stopped being horizontally centralized. Center the folder icon horizontally again. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/817 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 98bd5ec96..9a7b64521 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1305,8 +1305,11 @@ class FolderView extends BaseAppView { createFolderIcon(size) { let layout = new Clutter.GridLayout(); - let icon = new St.Widget({ layout_manager: layout, - style_class: 'app-folder-icon' }); + let icon = new St.Widget({ + layout_manager: layout, + style_class: 'app-folder-icon', + x_align: Clutter.ActorAlign.CENTER, + }); layout.hookup_style(icon); let subSize = Math.floor(FOLDER_SUBICON_FRACTION * size); let scale = St.ThemeContext.get_for_stage(global.stage).scale_factor;